package com.zp.drug.entity.bo;

import com.zp.common.core.entity.BaseEntity;
import com.zp.common.core.validate.AddGroup;
import com.zp.common.core.validate.EditGroup;
import com.zp.drug.api.vo.DrugInfoVo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 药品库存业务对象
 *
 * @author zhang peng
 * @ date 2023-06-08
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class DrugStockBo extends BaseEntity {

    /**
     * 主键
     */
//    @NotBlank(message = "主键不能为空", groups = {AddGroup.class, EditGroup.class})
    private String id;

    /**
     * 药品编码
     */
    @NotBlank(message = "药品编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugCode;

    /**
     * drugInfoId
     */
//    @NotBlank(message = "drugInfoId不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugInfoId;

    /**
     * drug_price_id
     */
    private String drugPriceId;

    /**
     * 小包装的药品价表id
     */
    private String drugMinPriceId;

    /**
     * 大小包装：1(小包装)；2(大包装)
     */
    private String packSize;

    /**
     * 库存单位
     */
    @NotBlank(message = "库存单位不能为空", groups = {AddGroup.class, EditGroup.class})
    private String storageId;

    /**
     * 库存单位名称
     */
    private String storageName;

    /**
     * 包装数量
     */
    private Integer packageNum;

    /**
     * 包装规格
     */
    @NotBlank(message = "包装规格不能为空", groups = {AddGroup.class, EditGroup.class})
    private String packageSpec;

    /**
     * 包装单位
     */
    @NotBlank(message = "包装单位不能为空", groups = {AddGroup.class, EditGroup.class})
    private String packageUnits;

    /**
     * 最小规格
     */
    @NotBlank(message = "最小规格不能为空", groups = {AddGroup.class, EditGroup.class})
    private String minSpec;

    /**
     * 最小单位
     */
    @NotBlank(message = "最小单位不能为空", groups = {AddGroup.class, EditGroup.class})
    private String minUnits;

    /**
     * 进货价
     */
    @NotNull(message = "进货价不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal tradePrice;

    /**
     * 进货价(小规格)
     */
    private BigDecimal tradePriceMin;

    /**
     * 售价
     */
    private BigDecimal retailPrice;

    /**
     * 售价(小规格)
     */
    private BigDecimal retailPriceMin;

    /**
     * 网络价格
     */
    private BigDecimal networkPrice;

    /**
     * 网络价（小规格）
     */
    private BigDecimal networkPriceMin;

    /**
     * 折扣
     */
    private BigDecimal discount;

    /**
     * 批号
     */
    @NotBlank(message = "批号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String batchNo;

    /**
     * 生产日期
     */
    private Date produceDate;

    /**
     * 有效期
     */
    private Date expireDate;

    /**
     * 小包装库存量
     */
    private Integer quantity;

    /**
     * 机构ID
     */
    @NotBlank(message = "机构ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String orgId;

    /**
     * 入库单号
     */
    @NotBlank(message = "入库单号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String documentNo;

    /**
     * 对应的入库主表ID
     */
    @NotBlank(message = "对应的入库主表ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String importMasterId;

    /**
     * 货位
     */
    private String location;

    /**
     * 供应商
     */
    private String supplierId;

    /**
     * 盘点是否显示（库存为0不显示）
     */
    private String inventoryIsShow;

    /**
     * 备注信息
     */
    private String remarks;

    /**
     * 是否供应Y供应,N停止
     */
    private String isSupply;

    /**
     * 停止供应操作人
     */
    private String stopOperator;

    /**
     * 停止供应时间
     */
    private Date stopDate;

    /**
     * 比例
     */
    private BigDecimal proportion;

    /**
     * 是否零库存
     */
    private Boolean zeroStock;

    /**
     * 药品名称
     */
    private String drugName;

    /**
     * 药品分类
     */
    private String drugClass;

    /**
     * 库存流转类型
     */
    private String recordType;

    /**
     * 药品规格、价钱相同，但批次不同的药品保存id相同
     */
    private String identicalInfoId;

    private DrugInfoVo drugInfoVo;

    private DrugImportDetailBo drugImportDetailBo;

    private DrugImportMasterBo drugImportMasterBo;

    private DrugExportMasterBo drugExportMasterBo;

    private DrugExportDetailBo drugExportDetailBo;
}
